package com.link2room.rodimus.entity;

import com.link2room.common.entity.BaseEntity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by LN on 2017/8/9.10:35
 */
@Entity
@Table(name = "member_level")
public class MemberLevelEntity extends BaseEntity{
    private String l2RLevel;
    private String cardLevel;
    private String cardType;

    @Basic
    @Column(name = "l2r_level")
    public String getL2RLevel() {
        return l2RLevel;
    }

    public void setL2RLevel(String l2RLevel) {
        this.l2RLevel = l2RLevel;
    }

    @Basic
    @Column(name = "card_level")
    public String getCardLevel() {
        return cardLevel;
    }

    public void setCardLevel(String cardLevel) {
        this.cardLevel = cardLevel;
    }

    @Basic
    @Column(name = "card_type")
    public String getCardType() {
        return cardType;
    }

    public void setCardType(String cardType) {
        this.cardType = cardType;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MemberLevelEntity that = (MemberLevelEntity) o;

        if (l2RLevel != null ? !l2RLevel.equals(that.l2RLevel) : that.l2RLevel != null) return false;
        if (cardLevel != null ? !cardLevel.equals(that.cardLevel) : that.cardLevel != null) return false;
        if (cardType != null ? !cardType.equals(that.cardType) : that.cardType != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = l2RLevel != null ? l2RLevel.hashCode() : 0;
        result = 31 * result + (cardLevel != null ? cardLevel.hashCode() : 0);
        result = 31 * result + (cardType != null ? cardType.hashCode() : 0);
        return result;
    }
}
